package cloud.dwz.api;

import io.wit.config.ConfigFile;
import io.wit.tool.ToolClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.HashMap;

@RestController
@RequestMapping(ConfigFile.api_v10+"roleMenu")
public class RoleMenuController{

    //获取角色菜单并在微信公众号显示隐藏相应的按钮及导航
    @GetMapping(value = "/getListMenu",name = "roleMenu:getListMenu")// http://127.0.0.1/api/v1.0/roleMenu/getListMenu
    public void getListMenu(final HttpServletRequest request,final HttpServletResponse response){
        final ArrayList<HashMap<String,Object>> list = new ArrayList<>();
        final HashMap<String,Object> map = new HashMap<>();
        map.put("name","www.yinlz.com");
        map.put("age",18);
        map.put("address","云岩区未来方舟F4");
        list.add(map);
        final String json = ToolClient.queryJson(list);
        ToolClient.responseJson(json,response);
    }
}